home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animation How-To
/
Animation How-to CD.iso
/
PLY
/
CHAPTER3
/
ROCKY
/
ROCK3.PI
< prev
next >
Wrap
Text File
|
1994-01-01
|
1KB
|
66 lines
// ROCK3.PI
// Rocking Color Weirdness
start_frame 0
end_frame 29
total_frames 30
outfile "rock3"
define pi 3.1415927
define rad pi/180
define index 360/total_frames
define phz frame*index
define tx 100*sin(phz*rad)
define ty 50*sin(phz*rad)
define tz 100*sin(phz*rad)
// Get various surface finishes
background MidnightBlue
light <0.5, 0.5, 0.5>, < 180, 150, -150>
light <0.5, 0.5, 0.5>, < 0, 100, -15>
light <0.5, 0.5, 0.5>, < 0, 0, 0>
// Set up the camera
viewpoint {
from <300,200,-250>
at <0,0,0>
up <0,1,0>
angle 90
hither 1
aspect 1.433
resolution 320,200
}
include "colormap.inc"
// Hints:
// position_plain 0
// position_objectx 1
// position_worldx 2
// position_cylindrical 3
// position_spherical 4
// position_radial 5
// lookup_plain 0
// lookup_sawtooth 1
// lookup_sin 2
// lookup_ramp 3
define a 3 // position
define b 2 // lookup
define c 2 // octaves
define d 2+sin(phz*rad) // turbulance
include "text2.inc"
// Create a volume
object {
sphere <0,0,0>, 10*54
color_phase
translate <tx,ty,tz>
}